<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require_once 'db_conn.php';
//echo "<pre>";
//print_r($_GET);
//die;  // 终止程序，到此为止

$id = $_GET['id'];


$sql = "
delete from t_message
where id=$id
";
//echo $sql;

//die;
$result = $conn->query($sql);
if($result===false){
    echo "数据库操作失败";
}else {
    header("Location: index.php");
}